function ValidateAssign()
{
var oInnerGrid = crmGrid.InnerGrid;
var oGridItems = oInnerGrid.SelectedRecords;
var iLength = oGridItems.length;
var iColIndex = oInnerGrid.FindColumnIndex("statecode");
if (iColIndex >= 0)
{
for (var i=0; i<iLength; i++)
{
var sState = oGridItems[i][3].cells[iColIndex].firstChild.innerHTML;
if (sState != LOCID_CASE_STATE_OPEN)
{
alert(LOCID_MESSAGE_CANNOT_ASSIGN);
return false;
}
}
}
return true;
}
